<?php
namespace Doc\Controller;

class BookController extends DocController {

	function index($id, $doc='') {
		$info = M('Category')->find($id);
		$this->assign('info', $info);
		$map['pid'] = $id;
		$this->assign('list', M('Controller')->where($map)->order('sort asc')->select());
		if ($doc) {
			$this->assign('doc', M('Controller')->find($doc));
			$amap['pid'] = $doc;
			$this->assign('actionlist', M('Action')->where($amap)->order('sort asc')->select());
		}
		$this->display();
	}
}